﻿"use strict";
var _isDebug = true;

//处理Error
var handleError = function (message, url, line) {
    if (!_isDebug) {
        alert(message);
    }

    return !_isDebug;
};

Error.defineError = function (type, message) {
    var e = new Error();
    e.name = type;
    e.message = message;
    return e;
};

window.onerror = handleError;